# -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template

urlpatterns = patterns(
    'marovi.views',

    #-----------------------------------------------------------------
    #   geo positioning example
    #-----------------------------------------------------------------
    (r'^index.html/$',  direct_to_template, 
                          {'template': 'marovi/index.html'}),
    
    (r'^upload/$',  direct_to_template, 
                          {'template': 'marovi/loadFile.html'}),
    
    (r'^uploadMaster/$',  direct_to_template, 
                          {'template': 'marovi/loadMasterGeoPosResFile.html'}),
    
    (r'^uploadDetail/$',  direct_to_template, 
                          {'template': 'marovi/loadDetailGeoPosResFile.html'}),
    
    (r'^admin/dashboard/$',  direct_to_template, 
                          {'template': 'marovi/adminDashboard.html'}),
                                          
    (r'^processSourceFile/$','process_excel'),
    (r'^processMasterFile/$','process_master_file'),
    (r'^processDetailFile/$','process_detail_file'),
    (r'^listLoads/$','display_loads'),                    
    (r'^listPoints/$','display_all_data'),     
    (r'^listPoints/(?P<p_day>\d+)/(?P<p_month>\d+)/(?P<p_year>\d+)/$','display_by_day'),

    (r'^etlStart/(?P<resolution>\d+)/(?P<day>\d+)/(?P<year>\d+)/(?P<hour>\d+)/$','agg_temp_data_by_res'),  

    #-----------------------------------------------------------------                   
    #  Reverse Geocoding                   
    #-----------------------------------------------------------------
    (r'^listBcn/$','display_rev_geocoding'), 
    
    (r'^activateRange/(?P<new_res>\d+)/$','send_range_to_datastore'),
                      
    #-----------------------------------------------------------------                   
    #  Task Queues                   processMicroDataWorker
    #-----------------------------------------------------------------
    (r'^processETLWorker/$','processETLWorker'),
    (r'^processGribWorker/$','processGribWorker'),
    (r'^processMasterWorker/$','processMasterLatLngWorker'),
    (r'^processMicroDataWorker/$','processMicroDataWorker'),
    
)
